<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <button onclick="back()">回退</button>
    <button onclick="forward()">前进</button>
</head>
<body>
    
</body>
<script>
    console.log(history)
    console.log(history.length)
    function back(){
        history.back()
    }
    function forward(){
        history.forward()
    }
</script>
</html>